/*     */ package com.iris.egrant.web.struts2.tags;
/*     */ 
/*     */ import com.iris.egrant.app.utils.IrisStringUtils;
/*     */ import freemarker.template.Configuration;
/*     */ import freemarker.template.Template;
/*     */ import java.io.Writer;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import javax.servlet.jsp.JspException;
/*     */ import javax.servlet.jsp.tagext.BodyTagSupport;
/*     */ import org.springframework.context.i18n.LocaleContextHolder;
/*     */ import org.springframework.web.context.WebApplicationContext;
/*     */ import org.springframework.web.context.support.WebApplicationContextUtils;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class DateTag
/*     */   extends BodyTagSupport
/*     */ {
/*     */   private static final long serialVersionUID = 1077194066541229822L;
/*  28 */   private String id = "";
/*     */   
/*  30 */   private String locale = "";
/*     */   
/*  32 */   private String value = "";
/*     */   
/*  34 */   private String onChange = "";
/*     */   
/*  36 */   private String className = "";
/*     */   
/*  38 */   private String name = "";
/*     */   
/*  40 */   private String label = "";
/*     */   
/*  42 */   private String onselected = "null";
/*     */ 
/*     */   
/*  45 */   private String size = "";
/*     */   
/*     */   public String getOnChange() {
/*  48 */     return this.onChange;
/*     */   }
/*     */   
/*     */   public void setOnChange(String onChange) {
/*  52 */     this.onChange = onChange;
/*     */   }
/*     */   
/*     */   public String getValue() {
/*  56 */     return this.value;
/*     */   }
/*     */   
/*     */   public void setValue(String value) {
/*  60 */     this.value = value;
/*     */   }
/*     */   
/*     */   public String getLocale() {
/*  64 */     if (IrisStringUtils.isNullOrBlank(this.locale)) {
/*  65 */       return LocaleContextHolder.getLocale().toString();
/*     */     }
/*  67 */     return this.locale;
/*     */   }
/*     */   
/*     */   public void setLocale(String locale) {
/*  71 */     this.locale = locale;
/*     */   }
/*     */   
/*     */   public String getOnselected() {
/*  75 */     return this.onselected;
/*     */   }
/*     */   
/*     */   public void setOnselected(String onselected) {
/*  79 */     this.onselected = onselected;
/*     */   }
/*     */ 
/*     */   
/*     */   public int doStartTag() throws JspException {
/*  84 */     WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(this.pageContext.getServletContext());
/*     */ 
/*     */     
/*  87 */     Configuration cptFreemarkereConfiguration = (Configuration)ctx.getBean("cptFreemarkereConfiguration");
/*     */     try {
/*  89 */       String res = (String)this.pageContext.getAttribute("res");
/*  90 */       Map<String, Object> rootMap = new HashMap<String, Object>();
/*  91 */       rootMap.put("res", res);
/*  92 */       rootMap.put("locale", getLocale());
/*  93 */       rootMap.put("id", this.id);
/*  94 */       rootMap.put("value", this.value);
/*  95 */       rootMap.put("onChange", this.onChange);
/*  96 */       rootMap.put("className", this.className);
/*  97 */       rootMap.put("name", this.name);
/*  98 */       rootMap.put("label", this.label);
/*  99 */       rootMap.put("onselected", this.onselected);
/* 100 */       rootMap.put("size", this.size);
/* 101 */       Template template = cptFreemarkereConfiguration.getTemplate("date.ftl", "utf-8");
/*     */       
/* 103 */       template.process(rootMap, (Writer)this.pageContext.getOut());
/*     */     }
/* 105 */     catch (Exception e) {
/* 106 */       throw new JspException(e);
/*     */     } 
/*     */     
/* 109 */     return 0;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getId() {
/* 114 */     return this.id;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setId(String id) {
/* 119 */     this.id = id;
/*     */   }
/*     */   
/*     */   public String getClassName() {
/* 123 */     return this.className;
/*     */   }
/*     */   
/*     */   public void setClassName(String className) {
/* 127 */     this.className = className;
/*     */   }
/*     */   
/*     */   public String getName() {
/* 131 */     return this.name;
/*     */   }
/*     */   
/*     */   public void setName(String name) {
/* 135 */     this.name = name;
/*     */   }
/*     */   
/*     */   public String getLabel() {
/* 139 */     return this.label;
/*     */   }
/*     */   
/*     */   public void setLabel(String label) {
/* 143 */     this.label = label;
/*     */   }
/*     */   
/*     */   public String getSize() {
/* 147 */     return this.size;
/*     */   }
/*     */   
/*     */   public void setSize(String size) {
/* 151 */     this.size = size;
/*     */   }
/*     */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\web\struts2\tags\DateTag.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */